function [Ytest, accuracy] = nvbclassify (Xtrain, Ytrain, Xtest, Ytesttrue)

nvb      = NaiveBayes.fit(Xtrain,Ytrain);
Ytest    = predict(nvb,Xtest);
ind      = find(Ytest==Ytesttrue);
accuracy = 100*size(ind,1)/size(Ytesttrue,1)

Ntest    = size(Xtest,1);
Clsno    = size(unique(Ytrain),1);
temp     = zeros(Ntest,Clsno);
temp     = temp';
temp2    = Ytest+Clsno*[0:Ntest-1]';
temp(temp2)=1;
Ytest    = temp';

end
